package com.mingqijia.gassafety.db.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mingqijia.gassafety.db.entity.annotation.OperateLogFiled;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.annotations.Property;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 控制器表
 * </p>
 *
 * @author guoliang.laoT
 * @since 2022-02-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dtu")
@ApiModel(value="Dtu对象", description="控制器表")
public class Dtu implements Serializable{

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "Id")
    private String id;

    @ApiModelProperty(value = "父级imei")
    @TableField(value = "parent_imei")
    private String parentImei;

    @ApiModelProperty(value = "电磁阀表主键id")
    @TableField(value = "valve_info_id")
    private Integer valveInfoId;

    @OperateLogFiled(name = "设备名称")
    @ApiModelProperty(value = "设备名称")
    @TableField("Name")
    private String name;

    @ApiModelProperty(value = "时间")
    @TableField("InstallTime")
    private Date installTime;


    @ApiModelProperty(value = "客户id")
    @TableField("ConsumerId")
    private Integer consumerId;

    @ApiModelProperty(value = "客户行业类型")
    @TableField("sector_type")
    private String sectorType;

    @OperateLogFiled(name = "安装日期")
    @ApiModelProperty(value = "日期")
    @TableField("install_date")
    private String installDate;
    @ApiModelProperty(value = "Path")
    @TableField("Path")
    private String path;

    @OperateLogFiled(name = "设备号")
    @ApiModelProperty(value = "设备号")
    @TableField("iMEI")
    private String iMEI;

    @OperateLogFiled(name = "设备厂商", dict = "equipment_manufacturer")
    @ApiModelProperty(value = "设备厂商")
    @TableField("equipment_manufacturer")
    private String equipmentManufacturer;

    @OperateLogFiled(name = "设备类型", dict = "equipment_type")
    @ApiModelProperty(value = "设备类型")
    @TableField("equipment_type")
    private String equipmentType;

    @OperateLogFiled(name = "设备型号", dict = "equipment_model")
    @ApiModelProperty(value = "设备型号")
    @TableField("equipment_model")
    private String equipmentModel;

    @ApiModelProperty(value = "检测类型")
    @TableField("detection_type")
    private String detectionType;

    @ApiModelProperty(value = "回路总数")
    @TableField(exist = false)
    private int loopAmount;

    @ApiModelProperty(value = "运营商")
    @TableField("operators")
    private String operators;

    @ApiModelProperty(value = "通讯方式")
    @TableField("communication_mode")
    private String communicationMode;

    @OperateLogFiled(name = "设备有效期")
    @ApiModelProperty(value = "有效期")
    @TableField("validity")
    private Integer validity;

    @ApiModelProperty(value = "设备到期时间")
    @TableField("expiration_time")
    private String expirationTime;

    @ApiModelProperty(value = "入网时间")
    @TableField("net_in_time")
    private String netInTime;

    @ApiModelProperty(value = "登记时间")
    @TableField("register_time")
    private String registerTime;

    @OperateLogFiled(name = "说明")
    @ApiModelProperty(value = "说明")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "设备id编号")
    @TableField("device_code")
    private String deviceCode;

    @ApiModelProperty(value = "回路对应点位数据")
    @TableField("loop_point")
    private String loopPoint;

    @ApiModelProperty(value = "流水数")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_YM")
    private Integer createYM;

    @ApiModelProperty(value = "aep平台已经注册：0未注册 1已经注册")
    @TableField("cmp_registered")
    private Integer cmpRegistered;

    @ApiModelProperty(value = "控制器类型0-独立式，1-总线控制式，2-分线控制式")
    @TableField("controller_type")
    private Integer controllerType;

    @ApiModelProperty(value = "应用场景J-家报，B-独立式，G-控制器多点式，X-线型管束")
    @TableField("app_site")
    private String appSite;

    @OperateLogFiled(name = "ICCID")
    @ApiModelProperty(value = "iccid")
    @TableField("iccid")
    private String iccid;

    @ApiModelProperty(value = "协议版本 1-1.0协议（默认），2-2.0协议")
    @TableField("protocol_version")
    private String protocolVersion;

    @ApiModelProperty(value = "模组型号 仅记录")
    @TableField("module_model")
    private String moduleModel;

    @ApiModelProperty(value = "设备来源：0：默认 1：紫荆wifi设备")
    @TableField("equipment_from")
    private Integer equipmentFrom;


    @ApiModelProperty(value = "供电类型（主电）0-市电;1-碱电;2-锂电")
    @TableField("power_model")
    private Integer powerModel;

    @ApiModelProperty(value = "删除标识")
    @TableField("is_deleted")
    private Integer isDeleted;


    @ApiModelProperty(value = "安装地址")
    @TableField("installation_address")
    private String installationAddress;

    @ApiModelProperty(value = "安装经度")
    @TableField("position_lon")
    private Double positionLon;

    @ApiModelProperty(value = "安装纬度")
    @TableField("position_lat")
    private Double positionLat;

    @OperateLogFiled(name = "安装位置")
    @ApiModelProperty(value = "安装位置")
    @TableField("installation_position")
    private String installationPosition;

    @ApiModelProperty(value = "联机码")
    @TableField("online_code")
    private String onlineCode;


    @ApiModelProperty(value = "紫荆设备编号")
    @TableField("device_no")
    private String deviceNo;

    @ApiModelProperty(value = "企业编号")
    @TableField("sp_id")
    private String spId;

    @ApiModelProperty(value = "0默认 外购：0 内购 1")
    @TableField("source")
    private Integer source;

    @ApiModelProperty(value = "回路情况（线上情况）")
    @TableField(exist = false)
    private List<Map<String,Object>> exts;


    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;
}
